package cn.com.sina.finance.todolist.bean;

/**
 * @author yuebo
 * @date 2024/9/30
 */
public class ApiResponse<T> {

    public int code;
    public String msg;
    public T data;

    public ApiResponse(int code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public boolean success() {
        return 0 == code;
    }

    @Override
    public String toString() {
        return "ApiResponse{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }
}
